# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=Params-Util
pkgname=perl-${_realname}
pkgver=1.102
pkgrel=1
pkgdesc="Simple, compact and correct param-checking functions"
arch=('i686' 'x86_64')
url="https://metacpan.org/release/Params-Util"
groups=('perl-modules')
depends=('perl')
makedepends=('perl-devel')
license=('GPL' 'PerlArtistic')
source=("https://cpan.metacpan.org/authors/id/R/RE/REHSACK/Params-Util-${pkgver}.tar.gz"
        01-msysize.patch)
sha256sums=('499bb1b482db24fda277a51525596ad092c2bd51dd508fa8fec2e9f849097402'
            '0cf95e252716dbaddb96916a945a82e5c10fe5bb0ff4451fe8299b15d5cbe017')

prepare() {
  cd "${srcdir}/${_realname}-${pkgver}"
  #patch -p1 -i ${srcdir}/01-msysize.patch
}

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  unset PERL5LIB PERL_MM_OPT
  PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps \
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make test
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make install DESTDIR="${pkgdir}"
}
